use master
go

create database houseId 
go

use houseId
go

create table tblUser
(
	userId int primary key identity(1,1) not null,
	userName nchar(6) not null,
	userTel char(11),
)
create table tblHouseType 
(
	typeId int primary key identity(1,1) not null,
	typName nchar(4) not null
)
create table tblQx
(
	qxId int primary key identity(1,1) not null,
	qxName nvarchar(10) not null
)
create table tblHouseInfo
(
	id int primary key identity(1,1) not null,
	descie text,
	userId int foreign key references tblUser(userId),
	zj varchar(10) not null,
	shi varchar(2) not null,
	ting varchar(2) not null,
	typeId int foreign key references tblHouseType(typeId),
	qxId int foreign key references tblQx(qxId)
)